/**
 *点击路由
 */
'use strict';

const conn = require('../../libs/DB/Conn');
const _ = require('underscore');


module.exports = async function (params) {
    let querySql =`SELECT
                        district_id AS districtId,
                        district_name AS districtName
                    FROM
                    district_file
                    WHERE
                    delete_sign = 1
                    ${params.parentId ? `AND parent_id = ${params.parentId}` : "AND parent_id = 0"}`
    let districtList =  await conn(querySql);
    return { success: true ,districtList:districtList};
};
